package com.bite.Timer;

public class Test {
    public static void main(String[] args) {
        MyTimer myTimer = new MyTimer();
        myTimer.schedule(new Thread() {
            @Override
            public void run() {
                System.out.println("任务9......");
            }
        },6000);

        myTimer.schedule(() -> {
            System.out.println("任务1......");
        },1000);

        myTimer.schedule(() -> {
            System.out.println("任务2......");
        },2000);

        myTimer.schedule(() -> {
            System.out.println("任务3......");
        },3000);

        myTimer.schedule(() -> {
            System.out.println("任务4......");
        },4000);

        myTimer.schedule(() -> {
            System.out.println("任务5......");
        },5000);

    }
}
